// import { redirect } from "next/navigation";
// import { auth } from "@/auth";

/* eslint-disable react/display-name */
export default function withAuth(allowedRoles: string[]) {
    // return function <P extends object>() {
    //     return async function (props: P) {
    //         const sess = await auth()
    //         // redirect the user to the login page if not logged in
    //         if (!sess)
    //             redirect("/login")
    //         // show 403 page if the user has not one of the required roles to access the page
    //         if (allowedRoles.length)
    //             if (!allowedRoles.includes(sess.user?.role)) {
    //                 return (
    //                   <div>test</div>
    //                 )
    //             }
    //         return<div>withOAuth</div>
    //     }
    // }
}
